<template>
  <div id="app">
    <el-container>
      <el-header>
        <el-tabs class="tabs" v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="用户" name="first"></el-tab-pane>
          <el-tab-pane label="教学" name="second">教学</el-tab-pane>
          <el-tab-pane label="题库" name="third">题库</el-tab-pane>
          <el-tab-pane label="运营" name="fourth">运营</el-tab-pane>
          <el-tab-pane label="营销" name="five">营销</el-tab-pane>
          <el-tab-pane label="商品" name="six">商品</el-tab-pane>
          <el-tab-pane label="财务" name="seven">财务</el-tab-pane>
          <el-tab-pane label="统计" name="eight">统计</el-tab-pane>
          <el-tab-pane label="系统" name="nine">系统</el-tab-pane>
        </el-tabs>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu default-active="/" class="el-menu-vertical-demo" :router="true">
            <el-menu-item index="/" to="/">
              <i class="el-icon-menu"></i>
              <span slot="title">学员管理</span>
            </el-menu-item>
            <el-menu-item index="/teacher" to="/teacher">
              <i class="el-icon-document"></i>
              <span slot="title">讲师管理</span>
            </el-menu-item>
            <el-menu-item index="/setting" to="/setting">
              <i class="el-icon-setting"></i>
              <span slot="title">助教管理</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeName: "first",
      tabPosition: "left"
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    }
  }
};
</script>

<style scoped>
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
}
.tabs {
  margin-left: 200px;
}
</style>